<?php


class Account
{
    //增
    public  function add()
    {
        $no = input('get.no');
        $name = input('get.name');
        $gender = input('get.gender');
        $a = new AccountModel;
        //
        $data = $a->where('account_no' . '=' . $no)->find();
        //
        if (!empty($data)) return '学号已存在~';
        $data = array();
        $data['account_no'] = $no;
        $data['account_name'] = $name;
        $data['account_gender'] = $gender;
        $data['add_time'] = time();
        return $a->insert($data);
    }
        //
        public function del()
        {
            $id = input('get.id');
            $a = new AccountModel;
            return $a->where('account_id'.'='.$id)->delete();

        }



}